package com.gmail.everhee.picasair.model
{
	
	import com.adobe.cairngorm.model.IModelLocator;
	
	import mx.collections.ArrayCollection;
	
	import org.ectar.papi.GDataService;	
		
		
	
	[Bindable]
	public class ModelLocator implements IModelLocator 
	{
	
		private static var instance:ModelLocator;
		
		public static function getInstance():ModelLocator
		{
			if(instance==null)	instance = new ModelLocator();
			return instance;
		}

		public function ModelLocator()
		{
			
			if(instance!=null) throw new Error("Error: Singletons can only be instantiated via getInstance() method!");
			ModelLocator.instance = this;
		}

		// DECLARE PROPERTIES HERE
		
		public var locale:String = "fr_FR";
		public var username:String;
		public var currentAlbum:String;
		public var currentPicture:String;
		public var pictureTitle:String;
		public var albumsCollection:ArrayCollection;
		public var albumDate:String;
		public var picturesCollection:ArrayCollection;
		public var gService:GDataService = new GDataService;
		
		// VIEWS CONSTANTS
		public var workflowState:uint = 0;
		/*public static const LOGIN_SCREEN:uint = 0;
		public static const MAIN_APP:uint = 1;*/
		
		public var viewState:uint = 0;
		/*public static const TOP_VIEW:uint = 0;
		public static const SHOWREEL_VIEW:uint = 1;
		public static const SEARCH_VIEW:uint = 2;*/
		
		
		
		
	}
}